package com.googlecode.c4e.ui.actions.internal;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;

public class BuildLogContentStorage implements IStorage {

	private String name;
	private String content;

	public BuildLogContentStorage(String name, String content) {
		this.name = name;
		this.content = content;
	}

	public InputStream getContents() throws CoreException {
		return new ByteArrayInputStream(content.getBytes());
	}

	public IPath getFullPath() {
		return null;
	}

	public String getName() {
		return name;
	}

	public boolean isReadOnly() {
		return true;
	}

	public Object getAdapter(Class adapter) {
		return null;
	}

}
